home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / Misc / GMS / GMSDev / Includes / graphics / screens.i < prev   
Encoding:
Text File  |  1997-12-14  |  8.0 KB  |  233 lines

  1.     IFND GRAPHICS_SCREENS_I
  2. GRAPHICS_SCREENS_I  SET  1
  3.  
  4. **
  5. **  $VER: screens.i V0.9B
  6. **
  7. **  Screen Definitions.
  8. **
  9. **  (C) Copyright 1996-1997 DreamWorld Productions.
  10. **      All Rights Reserved.
  11. **
  12.  
  13.     IFND    DPKERNEL_I
  14.     include 'games/dpkernel.i'
  15.     ENDC
  16.  
  17. *****************************************************************************
  18. * Module definitions.
  19.  
  20. ScrModVersion  = 0
  21. ScrModRevision = 9
  22.  
  23. *****************************************************************************
  24. * Screen object.
  25.  
  26. SCRVERSION  = 1
  27. TAGS_SCREEN = (ID_SPCTAGS<<16)|ID_SCREEN
  28.  
  29.     STRUCTURE    GS,HEAD_SIZEOF   ;[00] Standard header.
  30.     APTR    GS_MemPtr1       ;[12] Ptr to screen 1.
  31.     APTR    GS_MemPtr2       ;[16] Ptr to screen 2 (doubled buffer)
  32.     APTR    GS_MemPtr3       ;[20] Ptr to screen 3 (tripled buffer)
  33.     APTR    GS_Next          ;[24] Reserved.
  34.     APTR    GS_Palette       ;[28] Ptr to the screen palette.
  35.     APTR    GS_Raster        ;[32] Ptr to a raster object.
  36.     LONG    GS_EMPTY         ;[36]
  37.     WORD    GS_Width         ;[40] The width of the visible screen window.
  38.     WORD    GS_Height        ;[42] The height of the visible screen window.
  39.     WORD    GS_XOffset       ;[44] Hardware co-ordinate for TOS.
  40.     WORD    GS_YOffset       ;[46] Hardware co-ordinate for LOS.
  41.     WORD    GS_BmpXOffset    ;[48] Offset of the horizontal axis.
  42.     WORD    GS_BmpYOffset    ;[50] Offset of the vertical axis.
  43.     WORD    GS_ScrMode       ;[52] What screen mode is it?
  44.     WORD    GS_Emp           ;[54] Reserved.
  45.     LONG    GS_Attrib        ;[56] Special Attributes are?
  46.     APTR    GS_Task          ;[60] Task that owns this screen.
  47.     APTR    GS_Bitmap        ;[64] Pointer to bitmap structure (for blitting).
  48.     WORD    GS_Switch        ;[68] Set to 1 when ready to switch buffers.
  49.  
  50.     ;All of the following fields are private and you will break
  51.     ;compatibility with other GMS versions if you try and access them.
  52.  
  53.     WORD    GS_Prv           ;....
  54.     APTR    GS_TypeEmulator  ;Emulation.
  55.     APTR    GS_Monitor       ;Monitor driver.
  56.     APTR    GS_EMemPtr1      ;Chunky driver.
  57.     APTR    GS_EMemPtr2      ;Chunky driver.
  58.     APTR    GS_EMemPtr3      ;Chunky driver.
  59.     APTR    GS_EFree1        ;Chunky driver.
  60.     APTR    GS_EFree2        ;Chunky driver.
  61.     APTR    GS_EFree3        ;Chunky driver.
  62.     BYTE    GS_ColBits       ;0 = 12bit, 1 = 24bit.
  63.     BYTE    GS_Pad           ;Unused.
  64.     LONG    GS_ShowKey       ;Resource key if the screen is shown.
  65.     LONG    GS_Scratch       ;Scratch address!
  66.     APTR    GS_ScreenPrefs   ;Screen preferences for this screen.
  67.     APTR    GC_LineWait      ;Line Wait till bitplanes start.
  68.     APTR    GC_End           ;Ptr to the copper's jump end. (26!)
  69.     WORD    GC_BurstLevel    ;FMode setting for bitplanes.
  70.     APTR    GC_Control       ;BPLCON0
  71.     APTR    GC_Modulo        ;The screen modulo.
  72.     APTR    GC_ScrPosition   ;DIW's, DDF's, DIWHIGH
  73.     APTR    GC_Start         ;Start of main copperlist.
  74.     APTR    GC_Sprites       ;Pointer to the copper sprites.
  75.     APTR    GC_Colours       ;Pointer to the copper colours.
  76.     WORD    GC_AmtBankCols   ;Amount of colours per bank (AGA).
  77.     WORD    GC_AmtBanks      ;Amount of banks in total (AGA).
  78.     WORD    GC_HiLoOffset    ;Offset between hi and lo bits (AGA)
  79.     APTR    GC_Bitplanes1    ;Ptr to copper bitplane loaders #1.
  80.     APTR    GC_Bitplanes2    ;Ptr to copper bitplane loaders #2.
  81.     APTR    GC_Bitplanes3    ;Ptr to copper bitplane loaders #3.
  82.     APTR    GC_ColListJmp    ;Jumper to RasterList.
  83.     LONG    GD_BmpXOffset    ;X offset for scrolling.
  84.     LONG    GD_BmpYOffset    ;Y offset for scrolling.
  85.     WORD    GD_ScrollBWidth  ;Set to 2 if scrolling.
  86.     APTR    GD_MemPtr1       ;Original screen mem start (1).
  87.     APTR    GD_MemPtr2       ;Original screen mem start (2).
  88.     APTR    GD_MemPtr3       ;Original screen mem start (3).
  89.     WORD    GD_BPLCON3       ;BPLCON3 actual data (not a ptr).
  90.     WORD    GD_AmtFields     ;Amount of PlayFields on screen.
  91.     WORD    GD_FieldNum      ;Number of this field...
  92.     WORD    GD_ScrLRWidth    ;ScrWidth, in lo-resolution.
  93.     WORD    GD_ScrLRBWidth   ;ScrByteWidth, in lo-resolution.
  94.     WORD    GD_PicLRWidth    ;PicWidth, in lo-resolution.
  95.     WORD    GD_TOSX          ;Top of screen X for this screen.
  96.     WORD    GD_TOSY          ;Top of screen Y for this screen.
  97.     APTR    GD_CopperMem     ;Pointer to original screen mem start.
  98.     APTR    GD_Bitmap        ;Allocated bitmap.
  99.     WORD    GD_BlitXOffset   ;Offset to use for blitting (hard-scroll).
  100.     APTR    GD_Palette       ;Allocated palette.
  101.  
  102. ;---------------------------------------------------------------------------;
  103. ;Screen Buffer names, these are asked for in the blitter functions.
  104.  
  105. BUFFER1 = GS_MemPtr1
  106. BUFFER2 = GS_MemPtr2
  107. BUFFER3 = GS_MemPtr3
  108.  
  109. ;---------------------------------------------------------------------------;
  110. ;Screen types (flags for GS_ScrType).
  111.  
  112. INTERLEAVED = 1           ;Interleaved (2 ... 256 colours)
  113. ILBM        = INTERLEAVED ;Short synonym of Interleaved.
  114. PLANAR      = 2           ;Planar (2 ... 256 colours)
  115. CHUNKY8     = 3           ;Chunky 8 bit (256 colours)
  116. CHUNKY16    = 4           ;Chunky 16 bit (65535 colours)
  117. TRUECOLOUR  = 5           ;True colour (16 million colours)
  118.  
  119. ;---------------------------------------------------------------------------;
  120. ;Screen attributes and options (flags for GS_ScrAttrib).
  121.  
  122. B_DBLBUFFER    =  0
  123. B_TPLBUFFER    =  1
  124. B_PLAYFIELD    =  2
  125. B_HSCROLL      =  3
  126. B_VSCROLL      =  4
  127. B_SPRITES      =  5
  128. B_SBUFFER      =  6
  129. B_CENTRE       =  7
  130. B_BLKBDR       =  8
  131. B_NOSCRBDR     =  9
  132. B_BLANKPALETTE =  10
  133.  
  134. DBLBUFFER    = (1<<B_DBLBUFFER)    ;For double buffering.
  135. TPLBUFFER    = (1<<B_TPLBUFFER)    ;Triple buffering!!
  136. PLAYFIELD    = (1<<B_PLAYFIELD)    ;Set if it's part of a playfield.
  137. HSCROLL      = (1<<B_HSCROLL)      ;Gotta set this to do scrolling.
  138. VSCROLL      = (1<<B_VSCROLL)      ;For vertical scrolling.
  139. SPRITES      = (1<<B_SPRITES)      ;Set this if you want sprites.
  140. SBUFFER      = (1<<B_SBUFFER)      ;Create a scroll buffer for up to 100 screens.
  141. CENTRE       = (1<<B_CENTRE)       ;Centre the screen (sets ScrXOffset/ScrYOffset).
  142. BLKBDR       = (1<<B_BLKBDR)       ;Gives a blackborder on AGA machines.
  143. NOSCRBDR     = (1<<B_NOSCRBDR)     ;For putting sprites in the border.
  144. BLANKPALETTE = (1<<B_BLANKPALETTE) ;For a blank (black) palette.
  145.  
  146. ;---------------------------------------------------------------------------;
  147. ;Screen modes (flags for GS_ScrMode).
  148.  
  149. B_HIRES   =  0
  150. B_SHIRES  =  1
  151. B_LACED   =  2
  152. B_LORES   =  3
  153. B_EXTRAHB =  4
  154. B_SLACED  =  5
  155. B_HAM     =  6
  156.  
  157. HIRES   =  (1<<B_HIRES)   ;High resolution.
  158. SHIRES  =  (1<<B_SHIRES)  ;Super-High resolution.
  159. LACED   =  (1<<B_LACED)   ;Interlaced.
  160. LORES   =  (1<<B_LORES)   ;Low resolution (default).
  161. EXTRAHB =  (1<<B_EXTRAHB) ;Set for extra half-brite.
  162. HILACED =  (1<<B_SLACED)  ;Higher Laced resolution.
  163. HAM     =  (1<<B_HAM)     ;For HAM mode.
  164.  
  165. ;---------------------------------------------------------------------------;
  166. ;Screen Attribute tags.
  167.  
  168. GSA_MemPtr1    = TAPTR|GS_MemPtr1
  169. GSA_MemPtr2    = TAPTR|GS_MemPtr2
  170. GSA_MemPtr3    = TAPTR|GS_MemPtr3
  171. GSA_Next       = TAPTR|GS_Next
  172. GSA_Palette    = TAPTR|GS_Palette
  173. GSA_Raster     = TAPTR|GS_Raster
  174. GSA_Width      = TWORD|GS_Width
  175. GSA_Height     = TWORD|GS_Height
  176. GSA_XOffset    = TWORD|GS_XOffset
  177. GSA_YOffset    = TWORD|GS_YOffset
  178. GSA_BmpXOffset = TWORD|GS_BmpXOffset
  179. GSA_BmpYOffset = TWORD|GS_BmpYOffset
  180. GSA_Attrib     = TLONG|GS_Attrib
  181. GSA_ScrMode    = TWORD|GS_ScrMode
  182. GSA_Task       = TAPTR|GS_Task
  183.  
  184. GSA_BitmapTags = TSTEPIN|GS_Bitmap
  185.  
  186. *****************************************************************************
  187. *
  188.     STRUCTURE    RasterV1,HEAD_SIZEOF
  189.     APTR    RAS_Command    ;Pointer to the first command.
  190.     APTR    RAS_Screen    ;Pointer to our Screen owner.
  191.     LONG    RAS_Flags    ;Special flags.
  192.  
  193. *****************************************************************************
  194. * Rasterlist Definitions.
  195.  
  196. ID_RASTWAIT       = 1
  197. ID_RASTFLOOD      = 2
  198. ID_RASTCOLOUR     = 3
  199. ID_RASTCOLOURLIST = 4
  200. ID_RASTMIRROR     = 5
  201.  
  202. ID_LASTCOMMAND    = 6
  203.  
  204.     STRUCTURE    RStatsV1,0
  205.     LONG    RSTAT_CopSize
  206.     APTR    RSTAT_CopPos
  207.     LABEL    RSTATS_SIZEOF
  208.  
  209.     STRUCTURE    RHeadV1,0
  210.     WORD    RSH_ID
  211.     WORD    RSH_Version
  212.     APTR    RSH_Stats
  213.     APTR     RSH_Prev
  214.     APTR    RSH_Next
  215.     LABEL    RHEAD_SIZEOF
  216.  
  217.     STRUCTURE    RWaitV1,RHEAD_SIZEOF
  218.     WORD    RSW_Line
  219.  
  220.     STRUCTURE    RFloodV1,RHEAD_SIZEOF
  221.  
  222.     STRUCTURE    RColourV1,RHEAD_SIZEOF
  223.     LONG    RSC_Colour
  224.     LONG    RSC_Value
  225.  
  226.     STRUCTURE    RColourListV1,RHEAD_SIZEOF
  227.     WORD    RCL_Start
  228.     WORD    RCL_Skip
  229.     LONG    RCL_Colour
  230.     APTR    RCL_Values
  231.  
  232.   ENDC    ;GRAPHICS_SCREENS_I
  233.